package com.iris.live.services.services;

import com.iris.live.services.data.models.月度设定目标Model;
import com.iris.live.services.models.ResultData;

import java.util.List;

/**
 * Created by lusong on 2016/11/25.
 */
public interface CrossDepartmentTacticsService {

    ResultData lastMonthActualValue(String permit, RealInfo realInfo);

    ResultData weekActualValue(String permit, RealInfo realInfo);

    ResultData getWeekOfAttachers(String permit, RealInfo realInfo);

    ResultData getMonthOfAttachers(String permit, RealInfo realInfo);

    ResultData getSalesGroup(String permit);

    ResultData getAimValue(String year, String month, String permit);

    boolean saveAimValue(月度设定目标Model 月度设定目标Model);

    ResultData findEveryWeekOfTarget(String permit, GetYMAndCarCode getYMAndCarCode);

    ResultData saveEveryWeekOgTarget(String permit, String username, GetMonthSalesTarget getMonthSalesTarget);

    /**
     * 通过 permit，yearMonth，caeCode查询 结果责任部门
     *
     * @param permit
     * @param yearMonth
     * @param carCode
     * @return
     */
    public ResultData findRelevantDepartment(String permit, String yearMonth, String carCode);

    /**
     * 通过 permit，yearMonth，caeCode查询 行动提升计划
     *
     * @param permit
     * @param yearMonth
     * @param carCode
     * @return
     */
    public ResultData findActionPlan(String permit, String yearMonth, String carCode);

    /**
     * 保存 结果责任部门
     *
     * @param permit
     * @param getRelevantDepartment
     * @return
     */
    public ResultData saveRelevantDepartment(String permit, GetRelevantDepartment getRelevantDepartment);

    /**
     * 保存行动提升计划
     * @param permit
     * @param list
     * @return
     */
    public ResultData saveActionPlan(String permit, List<GetActionPlan> list);

    /**
     * 查询 大客户、展厅、车展的订单和交车数
     * @param permit
     * @param yearMonth
     * @param carCode
     * @return
     */
    public ResultData findCountAboutWingAndCusAndShow(String permit, String yearMonth, String carCode);

    /**
     * 查询 经销商下所有用户
     *
     * @param permit
     * @return
     */
    public ResultData findUserInfoByPermit(String permit);

    /**
     * 查询月结果责任部门目标
     *
     * @param permit
     * @param yearMonth
     * @param carCode
     * @return
     */
    public ResultData findMonthDepartmentTarget(String permit, String yearMonth, String carCode);

    /**
     * 查询月销售顾问目标
     *
     * @param permit
     * @param yearMonth
     * @param carCode
     * @return
     */
    public ResultData findMonthSalesTarget(String permit, String yearMonth, String carCode);

    /**
     * 保存月/周结果责任部门目标
     * @param permit
     * @param username
     * @param list
     * @return
     */
    public ResultData saveMonthDepartmentTarget(String permit, String username, List<GetMonthDepartmentTarget> list);

    /**
     * 保存月/周销售顾问目标
     * @param permit
     * @param uaername
     * @param list
     * @return
     */
    public ResultData saveMonthSalesTarget(String permit, String uaername, List<GetMonthSalesTarget> list);

    /**
     * 查询可接待用户
     * @param permit
     * @return
     */
    public ResultData getAvailableUser(String permit);

    /**
     * 查询有接待用户
     * @param permit
     * @param yearMonth
     * @return
     */
    public ResultData getAlreadyReceptionUser(String permit, String yearMonth);

    /**
     * 查询各责任部门目标周报信息，(如果没有保存周目标， 通过保存的月目标计算，公式为周天数占比乘以月目标)
     *
     * @param permit
     * @param yearMonth
     * @param carCode
     * @param week
     * @return
     */
    public ResultData findWeekDepartmentTarget(String permit, String yearMonth, String carCode, String week);

    /**
     * 查询销售顾问目标周报信息，(如果没有保存周目标， 通过保存的月目标计算，公式为周天数占比乘以月目标)
     * @param permit
     * @param yearMonth
     * @param carCode
     * @param week
     * @return
     */
    public ResultData findWeekSalesTarget(String permit, String yearMonth, String carCode, String week);

    static class GetYMAndCarCode {
        public String yearMonth;
        public String carCode;
        public String week;
    }

    static class GetRelevantDepartment {
        public String yearMonth;
        public String carCode;
        public String show;
        public String activeToShop;
        public String active;
        public String sleepToShop;
        public String sleep;
        public String groomToShop;
        public String groom;
        public String againToShopBuy;
        public String againBuy;
        public String individua;
        public String individuaIo;
        public String incomingToShop;
        public String incoming;
        public String networkToShop;
        public String newWork;
        public String drivingToShop;
        public String driving;
    }


    static class GetActionPlan {
        public String yearMonth;
        public String carCode;
        public String 行动提升方案;
        public String 启用时间;
        public String 结束时间;
        public String 负责人;
        public String 第一周落实结果;
        public String 第二周落实结果;
        public String 第三周落实结果;
        public String 第四周落实结果;
        public String 第五周落实结果;
    }

    static class GetMonthDepartmentTarget {
        public String 年月;
        public String 车型;
        public String 第N周;
        public String 部门;
        public String 散客线索数;
        public String 散客进店线索数;
        public String 呼入线索数;
        public String 呼入进店线索数;
        public String 网络线索数;
        public String 网络进店线索数;
        public String 主动集客线索数;
        public String 主动集客进店线索数;
        public String 推荐线索数;
        public String 推荐进店线索数;
        public String 再购线索数;
        public String 再购进店线索数;
        public String 活跃线索数;
        public String 活跃进店线索数;
        public String 休眠线索数;
        public String 休眠进店线索数;
    }

    static class GetMonthSalesTarget {
        public String 年月;
        public String 销售顾问;
        public String 车型;
        public String 第N周;
        public String 交车数;
        public String 订单数;
        public String 报价数;
        public String 进店线索数;
        public String 总线索数;
        public String 活跃进店线索数;
        public String 休眠进店线索数;
        public String 推荐进店线索数;
        public String 再购进店线索数;
        public String 散客进店线索数;
        public String 呼入进店线索数;
        public String 网络进店线索数;
        public String 主动集客进店线索数;
        public String 活跃线索数;
        public String 休眠线索数;
        public String 推荐线索数;
        public String 再购线索数;
        public String 散客线索数;
        public String 呼入线索数;
        public String 网络线索数;
        public String 主动集客线索数;
        public String 试驾数;
    }

    class RealInfo {
        public String year;//年
        public String month;//月份
        public String carCode;//车型
        public String groupType;//是否按销售顾问区分
        public String beginDay;//每周开始日期
        public String endDay;//每周结束日期
        public String weeks;//总周数
        public String days;//周天数
    }

}
